﻿using System;

namespace Bridge.UI.Utilities
{
    /// <summary>
    /// Attribute to display a UI piece of information.
    /// </summary>
    [AttributeUsage(AttributeTargets.Field)]
    public class UIDisplayAttribute : Attribute
    {
        /// <summary>
        /// Default constructor
        /// </summary>
        public UIDisplayAttribute()
        {
        }

        /// <summary>
        /// Constructor for display name.
        /// </summary>
        /// <param name="displayName">Display name for this field.</param>
        public UIDisplayAttribute(string displayName)
        {
            DisplayName = displayName;
        }

        /// <summary>
        /// Constructor for a display name and a conversion name for a specific way to parse it.
        /// </summary>
        /// <param name="displayName">Display name for this field.</param>
        /// <param name="conversionName">Name to look for to convert from the statblock.</param>
        public UIDisplayAttribute(string displayName, string conversionName) : this(displayName)
        {
            ConversionName = conversionName;
        }

        /// <summary>
        /// Constructor for a display name and a conversion name for a specific way to parse it.
        /// </summary>
        /// <param name="displayName">Display name for this field.</param>
        /// <param name="conversionName">Name to look for to convert from the statblock.</param>
        /// <param name="tag">Custom Tag to add to the UIDisplayAttribute.</param>
        public UIDisplayAttribute(string displayName, string conversionName, object tag)
            : this(displayName, conversionName)
        {
            Tag = tag;
        }

        public string DisplayName
        {
            get;
            private set;
        }

        public string ConversionName
        {
            get;
            private set;
        }

        public object Tag
        {
            get;
            private set;
        }

    }
}
